package com.hele.sts.webdoc;

import java.sql.ResultSet;
import java.sql.SQLException;

import com.hele.sts.pub.SqlQuery;
import com.hele.sts.pub.SqlUpdate;

public class QydaBean
{
  SqlUpdate sqlupdate;
  
  public QydaBean()
  {
    this.sqlupdate = null;
  }
  
  public ResultSet getDa_qyajb(String tNbxh)
  {
    ResultSet rs = null;
    SqlQuery sqlquery = new SqlQuery();
    String sqlstr = "";
    sqlstr = "select * from da_qyajb where 1=1 ";
    if (!tNbxh.equals("")) {
      sqlstr = sqlstr + " and nbxh = '" + tNbxh.trim() + "'";
    } else {
      sqlstr = sqlstr + " and 1=2";
    }
    try
    {
      rs = sqlquery.getResultSet(sqlstr);
    }
    catch (SQLException e)
    {
      e.printStackTrace();
    }
    return rs;
  }
  
  public void queryclose() {}
  
  public void updateclose()
  {
    this.sqlupdate.close();
  }
}
